<template>
	<view class="content">
		 <u-navbar     
		           :title="title"
		 		   :placeholder="true"
		 		   :titleStyle="titleStyle" 
		           @leftClick="backTo()"  
		 		  :fixed="true"
		       >
		 </u-navbar>
		 
		 <view class="clear_box1">
		 	
		 </view>
		 
		 <view class="main_box">
		 	   <view class="box">
		 	   	   <u-parse :lazyLoad="true" :content="content" :selectable="true" ></u-parse>
		 	   </view>
		 </view>
		 <view class="box2">
		 		
		 	 <view class="box2_2">
		 	 	{{time}}
		 	 </view>
		 </view>
		 
		 
		 <view class="" style="height: 10vh;">
		 	  
		 </view>
		 
		 
		 
	</view>
</template>

<script>
	export default{
		data(){
			return{
				id : 0,
				show: false,
				title : '',
				time : '',
				ori : '',
				content : '',
				titleStyle:{
					  fontWeight: 'bold',
				},
				placeholderStyle:{
					textAlign : 'center',
				}
			}
		},
		onLoad(opt) {
			this.id = opt.id || 0;
			if(opt.ori){
				this.ori = opt.ori;
			}
			this.initData();
		},
		methods:{
			initData(){
				let url = this.site_url + 'api/index/art_detail?article_id='+this.id;
				let param = {ori : this.ori};
				this.areq(url,param,'POST').then(res=>{
					 if(res.code == 1){		 
						 let ret = res.data;
						 this.title = ret.title;
						 this.time = ret.publish_time;
						 this.content = ret.content;
					 }
					
				})
			},
			close(){
				this.show = false;
			},
	
		}
		
	}
</script>

<style lang="scss">
	%fc{
	 display: flex;
	 justify-content: center;
	 align-items: center;
	}
	.main_box{
		width: 94%;
		margin: 0 auto;
		display: flex;
		margin-top: 20rpx;
		background-color: #fff;
		flex-direction: column;
		border-radius: 10rpx;
		overflow: hidden;
		margin: 0 atuo;
		flex-wrap: wrap;
		.box{
			width: 100%;
			height: auto;
			padding: 0 20rpx;
			font-size: 3.5vw;
			//color: $sb-color;
			line-height: 1.7;
			color: #333;
			    
		}
	}
	
	.box2{
		width: 100%;
		height: 130rpx;
		//background-color: red;
		display: block;
		flex-direction: row;
		text-align: right;
		&_2{
			margin-top: 10rpx;
			margin-right: 10vw;
			margin-bottom: 20rpx;
			font-size: 3.5vw;
			color: #999;
		}
	}

</style>